 {
        
        var o = require("../UISoundManager.js"), i = require("../UIPopupBase.js");
        cc.Class({
            extends: i,
            properties: {
                alreadyGetMoney: {
                    default: null,
                    type: cc.Label
                },
                secondTime: {
                    default: null,
                    type: cc.Label
                },
                allMoney: {
                    default: null,
                    type: cc.Label
                },
                VideoBtn: {
                    default: null,
                    type: cc.Button
                },
                shareBtn: {
                    default: null,
                    type: cc.Button
                },
                playGameBtn: {
                    default: null,
                    type: cc.Button
                }
            },
            init: function () {
                this.setInformationWithTotalAndLoss();
            },
            onLoad: function () {
                this.getCashNums = 0, Global.notificationCenter.on(Global.eventName.MSG_CASH_RECORD, this.initDate.bind(this), this);
            },
            bindData: function () {
                Global.msgHandler.getCashRecord();
            },
            initDate: function (e) {
                if (e) {
                    cc.log("初始化数据data+++++++++++++++++++++11", e);
                    var t = e.result;
                    t && t.action == Global.eventName.MSG_CASH_RECORD && t.cashRecord && (this.getCashNums = t.cashRecord.length / 2,
                        cc.log("初始化数据data+++++++++++++++++++++22", t.cashRecord.length, this.getCashNums));
                }
            },
            showPanelUi: function (e, t, n, o) {
                this.GetMoney = e || "0";
                o = o || "0";
                this.alreadyGetMoney.string = this.GetMoney;
                var i = "";
                i = Global.config.isHaveRookieManTask ? "玩血流血战，领新手红包，新玩家提现无最低限额！" : "去血流血战的富商场和至尊场继续赢取现金红包吧！",
                    this.secondTime.string = i, this.allMoney.string = o + "元", 0 == this.GetMoney ? (this.VideoBtn.node.active = !1,
                    this.shareBtn.node.active = !1, this.playGameBtn.node.active = !0) : (this.VideoBtn.node.active = !0,
                    this.shareBtn.node.active = !0, this.playGameBtn.node.active = !1);
            },
            setInformationWithTotalAndLoss: function () {
                this.exchangedCoupon = 0;
                var e = Global.userProfile.getUserProfile();
                if (e && e.coupon >= 0) {
                    var t = e.coupon || 0;
                    this.exchangedCoupon = e.exchangedCoupon || 0;
                    var n = this.exchangedCoupon / 100;
                    cc.log("setInformationWithTotalAndLoss  红包刷新数据", t, n), this.showPanelUi(t / 100, null, null, n);
                }
            },
            OnPanelClose: function () {
                o.playEffect("select"), this.closePanel();
            },
            onVideoBtn: function () {
                o.playEffect("select"), console.log("onVideoBtn");
                var e = this, t = parseInt(100 * this.GetMoney), n = this.getCashLimit(t);
                if ("" == n) {
                    this.onGetCash(t, function () {
                        Global.utils.showViewAd(Global.config.adTaskUnitId, function () {
                            e.scheduleOnce(function () {
                                Global.msgHandler.getCashReward(t);
                            }, .2);
                        }, function () {
                            Global.utils.showNodeCommon("您在播放中途退出，无法领取游戏奖励", 3);
                        }), e.closePanel();
                    });
                } else Global.utils.showNodeCommon(n, 3);
            },
            onShareBtn: function () {
                o.playEffect("select");
                var e = parseInt(100 * this.GetMoney);
                console.log("onShareBtn+++++++,value =", e);
                var t = this.getCashLimit(e);
                if (cc.log("提现次数++++++++++++stringShow", t), "" == t) {
                    var n = this;
                    this.onGetCash(e, function () {
                        Global.utils_Share.shareToGroup(Global.config.sharePointId.RookieManRedPacket, function (t) {
                            Global.msgHandler.getCashReward(e), n.closePanel(), console.log("分享成功");
                        }, function (e) {
                            console.log("分享失败");
                        });
                    });
                } else Global.utils.showNodeCommon(t, 3);
            },
            onGetCash: function (e, t) {
                if (e >= 10 && e <= 70) {
                    var n = (Global.configCdn.getActivityAndTaskConf() || Global.configCdn.getDefaultConfig("activityAndTask")).redPacketkinds,
                        o = n[1].progressMax - n[0].progressMax, i = {
                            text: Global.config && Global.config.isHaveRookieManTask ? "再玩" + o + "局还可以领取0.7元现金红包，确定提现吗？" : "多玩几局可以提现更多哦，确定提现吗？",
                            confirmText: "确定",
                            confirmSp: Global.spriteAtlas.getOKSpf(),
                            cancelText: "取消",
                            cancelSp: Global.spriteAtlas.getCancelSpf(),
                            confirmCallback: function () {
                                console.log("确定"), t && t();
                            },
                            cancelCallback: function () {
                                console.log("取消");
                            }
                        };
                    Global.UIPopupManager.alert(i);
                } else t && t();
            },
            getCashLimit: function (e) {
                cc.log("提现次数++++++++++++this.getCashNums", this.getCashNums);
                var t = [30, 70, 500], n = "";
                return 0 == this.getCashNums ? e >= t[0] ? n : n = "首次满0.3元就可以提现，再去赢一把～" : 1 == this.getCashNums ? e >= t[1] ? n : n = "再次提现需要满0.7元，只差一点点，再去赢几把！" : this.getCashNums >= 2 ? e >= t[2] ? n : n = "再次提现需要满5元哦，去积累更多的财富吧！" : void 0;
            },
            onPlayGameBtn: function () {
                var e = {
                    playMode: Global.config.playModel.XUELIU,
                    gameId: Global.config.GAMEID_NORMAL,
                    type: "onPlayGameBtn"
                };
                Global.notificationCenter.emit(Global.eventName.MSG_DO_QUICK_START, e);
            },
            onExpressiveBtn: function () {
                console.log("onExpressiveBtn"), o.playEffect("select"), Global.UIPopupManager.addPopup("PopupPanel/Panel_Extractmoney");
            }
        })
    }